package com.kongyz.customer;

/**
 * @author kongyz
 * @date 2018/7/5 22:18
 * @Description:
 */
public class CustomerFactory {
    public static final String[] names={"余姚","玉环","海盐"};
    public static AbstractCustomer getCustomer(String name){
        for (int i=0;i<names.length;i++){
            if(names[i].equalsIgnoreCase(name)){
                return new RealCustomer(name);
            }
        }
        return new NullCustomer();
    }
}
